package org.biubiu0002.baiblog.core.utils;

import org.biubiu0002.baiblog.core.model.dto.TokenUserDto;

/**
 * @Author: biubiu0002
 * @Date: 2022-05-11 23:45
 **/
public class SecurityUtils {
    public static TokenUserDto getUser(){
        return  (TokenUserDto)ThreadLocalCache.getMap().get("user");
    }

    public static void setUser(TokenUserDto tokenUser){
        ThreadLocalCache.put("user",tokenUser);
    }

    public static void removeUser() {
        ThreadLocalCache.remove("user");
    }
}
